n = input('请输入:')
n = int(n)
c = 0
while c < n:
    s = int(input())
    if s % 10 < 5:
        print(s - s % 10)
    else:
        print(s + 10 - s % 10)
    c+=1